@echo off
echo.
echo [信息] 复制文件到Docker目录
echo.

%~d0
cd %~dp0

cd ..
echo 编译后端
start /wait cmd /c "mvn clean package -P prod -Dmaven.test.skip=true"
echo 编译前端
cd xy-ui
start /wait cmd /c "npm install"
start /wait cmd /c "npm run build:prod"
cd ..\docker

echo 复制 sql
xcopy ..\sql\xy_platform.sql .\mysql\db  /y
xcopy ..\sql\nacos_config.sql .\mysql\db  /y

echo 复制 html
xcopy ..\xy-ui\dist .\nginx\html\dist  /s /e /y

echo 复制 xy-gateway
xcopy ..\xy-gateway\target\xy-gateway.jar .\vctgo\gateway\jar  /y

echo 复制 xy-auth
xcopy ..\xy-auth\target\xy-auth.jar .\vctgo\auth\jar  /y

echo 复制 xy-demo
xcopy ..\xy-demo\target\xy-demo.jar .\vctgo\demo\jar  /y

echo 复制 xy-monitor
xcopy ..\xy-visual\xy-monitor\target\xy-monitor.jar  .\vctgo\visual\monitor\jar  /y

echo 复制 xy-system
xcopy ..\xy-modules\xy-system\target\xy-system.jar .\vctgo\modules\system\jar  /y

echo 复制 xy-file
xcopy ..\xy-modules\xy-file\target\xy-file.jar .\vctgo\modules\file\jar  /y

echo 复制 xy-gen
xcopy ..\xy-modules\xy-gen\target\xy-gen.jar .\vctgo\modules\gen\jar  /y

echo 复制 xy-job
xcopy ..\xy-modules\xy-job\target\xy-job.jar .\vctgo\modules\job\jar  /y

pause
